<html>
<head>
<script language="javascript" src="http://www.12301.cc/js/jquery-1.7.2.min.js"></script>
</head>
<body>
<form id="ourfrm">
<input type="text" name="" id="dddd" value="">
<input type="text" name="" id="ddddd" value="">
<input type="text" name="" id="ddd" value="">
<input type="text" name="" id="dd" value="">
</form>
<span id="submitBtn" >dddd</span>
<script>

$("#submitBtn").click(function(){
	var pp = "1_22";
	var pid = "pid["+pp+"]";
	$("#dddd").attr("name",pid);
	var ppd = "1_32";
	var piddd = "pid["+ppd+"]";
	$("#ddddd").attr("name",piddd);
	var ppd = "1_33";
	var pidd = "cid["+ppd+"]";
	$("#ddd").attr("name",pidd);
	
	var apd = "1_33";
	var aidd = "aid["+apd+"]";
	$("#dd").attr("name",aidd);
        var postData = $("form#ourfrm").serialize();
		$.ajax({
            type:'POST',url: 'http://www.12301.cc/admin/pppp.php',data: postData, dataType:'json',
			})
           .done(function(res) {
               alert(res['msg']);
               if(res['errcode']==1000) {
                    history.go(-1);
               }
               })
			   });
</script>
</body>
</html>